|
ARD2
1.00 for Rev B. Hardware
Airbag Reference Demonstrator using MPC5604P
|
Enhanced Direct Memory Access driver. More...
Functions | |
| void | vfnDMASet (uint8_t u8Chan, uint8_t *pu8DestAddr, uint8_t *pu8SourceAddr, uint16_t u16NOfBytes) |
| This function will configure a pre-configured channel for Data transmission in a byte-by-byte manner. | |
| void | vfnDMAConfig (TCD_t *ptMyTCD, uint8_t u8Channel) |
| This function will configure a channel for DMA action. | |
| void | vfnDMAStart (const uint8_t u8Chan) |
| This function will Start a DMA loop. | |
| void | vfnDMAEnable (const uint8_t u8Chan) |
| This function will enable a DMA channel. | |
| uint8_t | u8fnDMAPending (const uint8_t u8Chan) |
| This function will return a 1 when a DMA transfer is done. | |
| void | vfnDMACopyArray (uint8_t *pu8Source, uint8_t *pu8Target, uint16_t u16Size, uint8_t u8Channel) |
| Copies an array to a different location using eDMA. | |
| uint8_t | u8fnWaitForDMA (uint8_t u8Channel) |
| Waits for a major loop of a given channel to expire. | |
| uint8_t | u8fnDMAReturnChannelStatus (uint8_t u8Channel) |
| Returns the status for a given channel. | |
| void | vfnDMAMUXInit (uint8_t u8DMACh, uint8_t u8DMAMuxSource, uint8_t u8Trigger, uint8_t u8Enable) |
| Routes a DMAMux channel to the right trigger. | |
| void | vfnDMAMuxEnable (uint8_t u8DMACh, uint8_t u8Enable) |
| Enables a particular DMAMux channel that has already been configured through vfnDMAMUXInit. | |
| uint8_t | u8fnDMAMuxChEnStatus (uint8_t u8DMACh) |
| Tells the caller whether a particular DMA channel is enabled or not. | |
Variables | |
| const uint32_t | cu32DMACopyArrayTCD [] |
Enhanced Direct Memory Access driver.
Copyright (c) 2011 Freescale Semiconductor Freescale Confidential Proprietary
History:
| uint8_t u8fnDMAMuxChEnStatus | ( | uint8_t | u8DMACh | ) |
Tells the caller whether a particular DMA channel is enabled or not.
| u8DMACh,: | eDMA (0 - 15). |
| uint8_t u8fnDMAPending | ( | const uint8_t | u8Chan | ) |
This function will return a 1 when a DMA transfer is done.
| u8Chan,: | Channel to be used (0 - 15) |
| uint8_t u8fnDMAReturnChannelStatus | ( | uint8_t | u8Channel | ) |
Returns the status for a given channel.
| u8Channel,: | eDMA (0 - 15). |
| uint8_t u8fnWaitForDMA | ( | uint8_t | u8Channel | ) |
Waits for a major loop of a given channel to expire.
| u8Channel,: | eDMA (0 - 15). |
| void vfnDMAConfig | ( | TCD_t * | ptMyTCD, |
| uint8_t | u8Channel | ||
| ) |
This function will configure a channel for DMA action.
| ptMyTCD,: | Settings for TCD (refer to TCD_t) |
| u8Chan,: | Channel to be used (0 - 15) |
| void vfnDMACopyArray | ( | uint8_t * | pu8Source, |
| uint8_t * | pu8Target, | ||
| uint16_t | u16Size, | ||
| uint8_t | u8Channel | ||
| ) |
Copies an array to a different location using eDMA.
| pu8Source,: | Pointer to initial element to copy |
| pu8Target,: | Pointer to initial element to where to copy |
| u16NOfBytes,: | Size in bytes of stream to copy |
| u8Channel,: | eDMA (0 - 15) to use for copy. |
| void vfnDMAEnable | ( | const uint8_t | u8Chan | ) |
This function will enable a DMA channel.
| u8Chan,: | Channel to be used (0 - 15) |
| void vfnDMAMuxEnable | ( | uint8_t | u8DMACh, |
| uint8_t | u8Enable | ||
| ) |
Enables a particular DMAMux channel that has already been configured through vfnDMAMUXInit.
| u8DMACh,: | eDMA (0 - 15). |
| void vfnDMAMUXInit | ( | uint8_t | u8DMACh, |
| uint8_t | u8DMAMuxSource, | ||
| uint8_t | u8Trigger, | ||
| uint8_t | u8Enable | ||
| ) |
Routes a DMAMux channel to the right trigger.
| u8DMACh,: | eDMA (0 - 15). |
| u8DMAMuxSource,: | DMA source as listed in DMA_MUX_SOURCES. |
| u8Trigger,: | non-zero for enable, zero for disable. This variable allows the DMA Mux to be triggered through a PIT channel. |
| u8Enable,: | non-zero to enable the DMA Mux right away, zero to disable. |
| void vfnDMASet | ( | uint8_t | u8Chan, |
| uint8_t * | pu8DestAddr, | ||
| uint8_t * | pu8SourceAddr, | ||
| uint16_t | u16NOfBytes | ||
| ) |
This function will configure a pre-configured channel for Data transmission in a byte-by-byte manner.
| u8Chan,: | Channel to be used (0 - 15) |
| pu8DestAddr,: | Where data will be copied to. |
| pu8SourceAddr,: | Where data comes from |
| u16NOfBytes,: | Self-explanatory. |
| void vfnDMAStart | ( | const uint8_t | u8Chan | ) |
This function will Start a DMA loop.
| u8Chan,: | Channel to be used (0 - 15) |
| const uint32_t cu32DMACopyArrayTCD[] |
{
(uint32_t)CLEAR,
(DMA_8_BIT_SOURCE | DMA_8_BIT_TARGET | DMA_OFFSET(1u)),
(uint32_t)CLEAR,
(uint32_t)CLEAR,
(uint32_t)CLEAR,
(CHANNEL_TO_CHANNEL_LINKING_ON_MINOR_LOOP_DIS | CURRENT_MAJOR_ITERATION(1u)
| DMA_OFFSET(1u)),
(uint32_t)CLEAR,
(CHANNEL_TO_CHANNEL_LINKING_ON_MAJOR_LOOP_DIS
| NUMBER_OF_MAJOR_ITERATIONS(1u) | DONT_STALL_DMA | DMA_ISR_WHEN_DONE) }
Following array is used as default settings for copying an array from one point to another. Ironically, it must be copied through a loop.